Skip to main content

Full text of "Arduino"

See other formats

Smart Greenhouse 


Make Projects 

build, hack, tweak, share, discover, J 

Smart Greenhouse 

Written By: Tyler 


Computer running Windows XP, Vista, 
or Mac OS XM) 

Electrical Tape (1) 
Hot Glue gun & hot glue (1) 
Laser cutting facilities (1) 
power drill and bit set (1) 


Parallax/Futaba servomotor (3) 

Arduino Uno (1) 

Breadboard kit (1) 

1/8in OP flexible tubing (2ft) 

1/8 in OP flexible tubing twist valve (1) 

11"x8.5" rectangular planter box (1) 

wine cork (2) 

Parrallax LM 34 Temperature Sensor (1) 

Large Plastic Yogurt container (2) 


1.5" 3 pin PWM cabled) 

12"x24"x1/8in thick acrylic sheets (2) 


The Smart Greenhouse is based on the vision of a greenhouse that would maintain a perfect 
micro-climate for a particular crop being cultivated inside without relying on any human 
adjustment. In other words, ideally this greenhouse could be left for a year in any 
(reasonable) climate and the seeds that were meant to grow would flourish totally 
unattended. It would be perfectly tailored to the vegetation inside to maximize its efficiency. 
Such a greenhouse would require cognitive abilities to sense its surrounding environment 
and either use or block certain conditions while it preserves a micro-climate within the walls 

© Make Projects 

Page 1 of 9 

Smart Greenhouse 
of the house. 

Variables that are most important for crop success are those such as air temperature, soil 
moisture and humidity level. This particular model greenhouse addresses two of these 
factors: air temperature and soil moisture. The greenhouse utilizes an Arduino UNO 
microprocessor and various sensors to regulate these two variables within a desired set of 
thresholds. These thresholds will, of course, vary with the type of crops that one would want 
to grow in the greenhouse. Inside the structure is a Texas Instruments LM 34 sensor which 
measures air temperature. This sensor informs the Arduino which then controls opening and 
closing of roof servos to let hot air out and cool air in if the greenhouse is overheating. By 
use of the mechanical roof the greenhouse can autonomously keep the inside temperature to 
a desired level, assuming that this level is somewhat within the natural range of the 
surrounding environment. Additionally, the Smart Greenhouse has an irrigation system 
triggered by a timer function in the code that can be varied in frequency depending on a 
plant's optimal watering cycle. The timer activates the internal drip irrigation via a servo- 
controlled valve. 

A possible addition to the Smart Greenhouse would be a soil-moisture sensor. This sensor 
could inform the drip irrigation system when the soil is too dry, creating a need-based 
watering pattern and potentially conserving water. 

All these features make the Smart Greenhouse one of the most intelligent and cost-effective 
of its kind. There are still possibilities for other additions to this system to improve its 
versatility and efficiency. 

© Make Projects Page 2 of 9 

Smart Greenhouse 

• The first step is to build the model 

• Go here for the Adobe Illustrator 
template files for the pieces. 

• Using a laser cutter, cut out pieces 
from 1/8"-thick acrylic. 

• Label the pieces with the letters 
shown in the Illustrator files. 

Step 2 

• Assemble greenhouse using 
labeled pieces and picture at right 
as a guide. 

• Use Weld-On acrylic cement to 
attach pieces together. 

• For best results use a plywood jig 
for cementing at right angles and 
apply pressure for up to four 
minutes while cement sets. 

© Make Projects 

Page 3 of 9 

Smart Greenhouse 

• Attach a Parallax servo to each to each roof panel with hot glue. 

• Using an L-bracket, attach the servo and roof panel to the front wall of the greenhouse with 
hot glue as shown. 

Assemble irrigation system as shown. 

Hot glue servo to valve handle. 

Hot glue servo to greenhouse using wood spacers if necessary. 

Using an X-Acto knife, pierce the flexible tubing every inch along the section that lies on 
the soil in the greenhouse. 

This will create a drip irrigation system. 

© Make Projects 

Page 4 of 9 

Smart Greenhouse 

• Create water tank by drilling hole in bottom of yogurt container and making water-tight 
attachment to tubing that goes to input of servo valve. 

• Use second yogurt container to elevate the water tank. 


. . . . . . I . . . . . . . . ..... ..... ..... .... 

Now that all the hardware has been 
constructed it is time for 

Prepare the Arduino and 
breadboard as shown in the 

Connect red jumper cable from 5v 
on Arduino to red power rail on 

Connect black jumper cable from 
GND on Arduino to black power rail 
on breadboard. 

© Make Projects 

Page 5 of 9 

Smart Greenhouse 

...... . T i ■ + i .-fa ■ + ■ ■ * i l + i4 + i« + i ■ + ■ i i t 4 » I 


va ■■■ ■ ■>■■■<.* »*■-■>«■ a I ■ fl I 

. . . ..a.. . . * . . ..... . m , . . . . ft . • ..... ..... 

More: This Is the 
PV.'kfc exTension fof 

• Attach LM-34 Sensor to PWM extension cable. 

• Note that the flat side of the LM-34 sensor is facing up. 

• Now, Ground is the black wire, Analog Out is the red wire, and +5v is the white wire on the 
PWM extension cable. 

• Wire sensor to breadboard and from breadboard to Arduino as shown in diagram. 

• Be sure that the black wire from the PWM gets wired to GND, the white wire to 5v and the 
red wire to Analog 2 (A2). 

• Thread the PWM cable with sensor through one of the access portals (round holes) on the 
front of the greenhouse and have the senor hang in the center of the greenhouse about 3" 
from the ground. 

© Make Projects 

Page 6 of 9 

Smart Greenhouse 

Step 8 

• Wire the two roof servos as shown 
in diagram. 

• Be sure that the right roof servo 
goes to Digital 9 and the left roof 
servo goes to Digital 10 on the 

Step 9 


Left Roof 

Right Roof 

• Wire the water valve servo as 

• Make sure that the white wire from 
the servo gets connected to Digital 
Output 9 (D11) on the Arduino. 

© Make Projects 

Page 7 of 9 

Smart Greenhouse 

Step 10 

the_entire_gfee*nhouje | Af-duino 1.0 J 
^'^a^^ctch Tcrols Help 

a itaa 


Q DP upload 




foKtposteft - 170; po»i*tt > 120; postett -= i) // t*n Le{t servo to go to positron > 


nvse t vol eft L ijrite(pos Lett}; // tell servo Co go Co position in vatialiie 

delavflS); // give each sc*p iSms 

roc tposHight - 0; posRight<50;pcSRight +- 1) fl t-11 Sight Secvo to go to position "o 

toySeEvoRight. nr. ;'^r[pcSRiGfttS; // E*ll HEBO to go Co position ttj V 

delay [is]; n glue each stsiu isus 


cieLay (1S00OJ ; //leave else soots open toe IS seconds to let gone hot ait escape 
timer +»14; // add IS a-ecands to the tiaec to account tor the approximate tine it took 

forfposleft >- ISO; pcsLect<-170; po*Left+-l) 

ayservoLeEC-. tfritfrtposieft); // tell SftZVO W go. to position til VAtiflSle 

delay (1S|; // waits 15*s for the seKvo co reach the position 


:Lor (poa&ight £=-50; pasftigntiO; posftight—1] /./ cell Left servo to cfo to position "closed 


B.yservoRight.vrn:e (poaEight) ; // tall Eight sertn to go to position "cloaed" in one d 
delay (IS); fl waits iSms dor. the servo to reach the position 

i.-i... ■ riOOC ": ; 

• Go here to retrieve the Arduino 
code for downloading to the 
Arduino Uno board. 

• Open the .ino file in the Arduino 
coding platfrom (if not downloaded, 
get it here ) . 

• Make sure "Arduino Uno" is 
selected under Tools^ Board. 

• Make sure correct serial port is 
selected in Tools^Serial Port for 

USB jack you will use to connect to 

• Download code to board using 
screenshots for guidance if 

• Feel free to edit code for personal 
use. Specifically, you may want to 

play around with the desireciTemp 

variable and the watering cycle 
timer for the values that would be 
ideal for your greenhouse needs! 

© Make Projects 

Page 8 of 9 

Smart Greenhouse 

Step 11 

• Your greehouse should be all set to self-regulate. 

• From here, make any tweaks, additions, improvements, etc. that you see fit and post them 
to this article! 

• Happy farming! 

This document was last generated on 201 3-02-1 4 07:02:54 AM. 

© Make Projects 

Page 9 of 9